<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-else and v-else-if</title>
</head>

<body>
    <div id="app">
        <p v-if="gender===1">性别：男</p>
        <p v-else>性别：女</p>
        <hr>
        <p v-if="score>=90">成绩评定A</p>
        <p v-else-if="score>=70">成绩评定B</p>
        <p v-else-if="score>=60">成绩评定C</p>
        <p v-else>成绩评定D</p>
    </div>
 
    <!-- 引入包-->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                gender:1,
                score:80
            }
        })
    </script>
</body>

</html>